﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DiemChapNhanThe.Data;
using DiemChapNhanThe.Entities;

public partial class Controls_ControlQuangCaoRight : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind_Data();
        }
    }
    public void Bind_Data()
    {
        int TotallRows = 0;
        string WhereClause = "1=1 and IdLoaiQuangCao=" + Common.QuangCaoRight;
        TList<QuangCao> Tlist_QuangCao = DataRepository.QuangCaoProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 3, out TotallRows);
        dlQuangCao.DataSource = Tlist_QuangCao;
        dlQuangCao.DataBind();

    }
}